package com.kgcx.organization.domain;

import com.kgcx.common.annotation.dict.Dict;
import com.kgcx.common.annotation.securety.Sensitive;
import com.kgcx.dbutils.annotation.SelectLike;
import com.kgcx.dbutils.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.sql.Timestamp;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "t_organization_driver")
@ApiModel(value = "司机")
public class Driver extends BaseDomain {
    public static final String DEFAULT_PASSWORD = "123456";

    public static final String SMS_VALIDATE_LOGIN_KEY_PREFIX = "SMS_VALIDATE_CODE.LOGIN.";

    public static final String SMS_VALIDATE_RESETPASSWORD_KEY_PREFIX = "SMS_VALIDATE_CODE.RESETPASSWORD.";

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像图片id", required = true, example = "649c38917ae84d5a9ab0ec97a4649328")
    private String headImg;
    @ApiModelProperty(value = "城市id", required = true, example = "4301")
    private Long cityId;
    /**
     * 人力服务公司id
     */
    @ApiModelProperty(value = "人力服务公司id", required = true, example = "1")
    private Long companyId;

    /**
     * 车辆id
     */
    @ApiModelProperty(value = "车辆", example = "1")
    private Long autoId;

    /**
     * 车牌号
     */
    @ApiModelProperty(value = "车牌号", example = "湘A99999")
    @SelectLike
    private String autoNo;

    /**
     * 名字
     */
    @ApiModelProperty(value = "名字", required = true, example = "周杰伦")
    @SelectLike
    private String name;
    /**
     * 生日
     */
    @ApiModelProperty(value = "生日", required = true, example = "1511248354000")
    private Date brithday;
    /**
     * 司机状态
     */
    @ApiModelProperty(value = "司机状态", required = true, example = "1")
    private Integer state;

    /**
     * 身份证号码
     */
    @ApiModelProperty(value = "身份证号码", required = true, example = "430236188711173267")
    @SelectLike
    @Sensitive(isEncrypt = true)
    private String idCardNumber;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话", required = true, example = "13023457687")
    @Sensitive(isEncrypt = true)
    private String phone;


    /**
     * 手机运营商
     */
    @ApiModelProperty(value = "1中国联通 2中国移动 3中国电信 4其他", required = true, example = "1")
    private String netType;

    @ApiModelProperty(value = "密码", example = "")
    @Sensitive(hide = true, hideEndIndex = -1)
    private String password;

    /**
     * 性别，0=未知，1=男，2=女，9=未说明,字典：gender
     */
    @ApiModelProperty(value = "性别，0=未知，1=男，2=女，9=未说明,字典：gender", required = true, example = "1")
    private String gender;

    /**
     * 国籍
     */
    @ApiModelProperty(value = "国籍", required = true, example = "中国")
    private String nationality;

    /**
     * 民族，字典：nation
     */
    @ApiModelProperty(value = "民族，字典：nation", required = true, example = "1")
    private String nation;
    /**
     * 通信地址城市id
     */
    @ApiModelProperty(value = "通信地址城市id", required = true, example = "4301")
    private Long contractAddressCityId;

    /**
     * 通信地址
     */
    @ApiModelProperty(value = "通信地址", required = true, example = "岳麓区中电软件园")
    private String contractAddress;

    /**
     * 外语能力
     */
    @ApiModelProperty(value = "外语能力", required = true, example = "1")
    private String languageLevel;

    /**
     * 婚姻状况
     */
    @ApiModelProperty(value = "婚姻状况", required = true, example = "1")
    private Integer maritalStatus;

    /**
     * 学历，字典：education
     */
    @ApiModelProperty(value = "学历，字典：education", required = true, example = "21")
    private Integer education;

    /**
     * 户口登记机关
     */
    @ApiModelProperty(value = "户口登记机关", required = true, example = "湖南省长沙市岳麓区派出所")
    private String census;
    /**
     * 户口地址城市id
     */
    @ApiModelProperty(value = "户口地址城市id", required = true, example = "4301")
    private Long addressCityId;

    /**
     * 户口地址
     */
    @ApiModelProperty(value = "户口地址", required = true, example = "岳麓区麓谷小镇")
    private String address;

    /**
     * 驾驶证号码
     */
    @ApiModelProperty(value = "驾驶证号码", required = true, example = "430236188711173267")
    private String licenseId;

    /**
     * 驾驶证照片id
     */
    @ApiModelProperty(value = "驾驶证照片id", required = true, example = "649c38917ae84d5a9ab0ec97a4649328")
    private String licensePhotoImg;

    /**
     * 驾驶证类型，字典：driverLicenseType
     */
    @ApiModelProperty(value = "驾驶证类型，字典：driverLicenseType", required = true, example = "C1")
    private String driverType;

    /**
     * 驾驶证首次发证日期
     */
    @ApiModelProperty(value = "驾驶证首次发证日期", required = true, example = "1511248354000")
    private Timestamp getDriverLicenseDate;

    /**
     * 驾驶证有效期起始
     */
    @ApiModelProperty(value = "驾驶证有效期起始", required = true, example = "1511248354000")
    private Timestamp driverLicenseOn;

    /**
     * 驾驶证有效期结束
     */
    @ApiModelProperty(value = "驾驶证有效期结束", required = true, example = "1511648354000")
    private Timestamp driverLicenseOff;

    /**
     * 是否巡游出租车驾驶员，1=是，0=否
     */
    @ApiModelProperty(value = "是否巡游出租车驾驶员，1=是，0=否", required = true, example = "0")
    private Integer texiDriver;

    /**
     * 网约车驾驶员资格证号码
     */
    @ApiModelProperty(value = "网约车驾驶员资格证号码", required = true, example = "871263712")
    private String certificateNo;

    /**
     * 网约车资格证发证机构
     */
    @ApiModelProperty(value = "网约车资格证发证机构", required = true, example = "网约车监管平台")
    private String networkCarIssueOrganization;

    /**
     * 网约车发证日期
     */
    @ApiModelProperty(value = "网约车发证日期", required = true, example = "1511248354000")
    private Timestamp networkCarIssueDate;

    /**
     * 资格证首次发证日期
     */
    @ApiModelProperty(value = "资格证首次发证日期", required = true, example = "1511248354000")
    private Timestamp getNetworkCarProofDate;

    /**
     * 资格证有效日期起始
     */
    @ApiModelProperty(value = "资格证有效日期起始", required = true, example = "1511248354000")
    private Timestamp networkCarProofOn;

    /**
     * 资格证有效日期结束
     */
    @ApiModelProperty(value = "资格证有效日期结束", required = true, example = "1511248354000")
    private Timestamp networkCarProofOff;

    /**
     * 报备日期
     */
    @ApiModelProperty(value = "报备日期", required = true, example = "1511248354000")
    private Timestamp registerDate;

    /**
     * 是否专职司机，1=是，0=否
     */
    @ApiModelProperty(value = "是否专职司机，1=是，0=否", required = true, example = "1")
    private Integer fullTimeDriver;

    /**
     * 是否在黑名单，1=是，0=否
     */
    @ApiModelProperty(value = "是否在黑名单，1=是，0=否", required = true, example = "0")
    private Integer inDriverBlackList;

    /**
     * 服务类型：1.网络预约出租车，2.巡游出租汽车，3.私人小客车合乘
     */
    @ApiModelProperty(value = "服务类型：1.网络预约出租车，2.巡游出租汽车，3.私人小客车合乘", required = true, example = "1")
    private Integer commercialType;

    /**
     * 合同签约公司
     */
    @ApiModelProperty(value = "合同签约公司", required = true, example = "空港出行")
    private String contractCompany;

    /**
     * 合同生效日期
     */
    @ApiModelProperty(value = "合同生效日期", required = true, example = "1511248354000")
    private Timestamp contractOn;

    /**
     * 合同结束日期
     */
    @ApiModelProperty(value = "合同结束日期", required = true, example = "1511248354000")
    private Timestamp contractOff;

    /**
     * 紧急联系人
     */
    @ApiModelProperty(value = "紧急联系人", required = true, example = "昆凌")
    private String emergencyContact;

    /**
     * 紧急联系人电话
     */
    @ApiModelProperty(value = "紧急联系人电话", required = true, example = "13787266748")
    private String emergencyContactPhone;
    /**
     * 紧急联系人地址城市id
     */
    @ApiModelProperty(value = "紧急联系人地址城市id", required = true, example = "4301")
    private Long emergencyContactAddressCityId;

    /**
     * 紧急联系人地址
     */
    @ApiModelProperty(value = "紧急联系人地址", required = true, example = "岳麓区麓谷小镇")
    private String emergencyContactAddress;


    /**
     * 最后更新状态时间
     */
    @ApiModelProperty(value = "最后更新状态时间", readOnly = true, example = "1511248354000")
    private Timestamp lastUpdateStateTime;
    /**
     * 待命时的机场ID
     */
    @ApiModelProperty(value = "待命时的机场ID", readOnly = true, example = "1")
    private Long airportId;
    /**
     * 待命时的高铁站ID
     */
    @ApiModelProperty(value = "待命时的高铁站ID", readOnly = true, example = "1")
    private Long stationId;

    /**
     * 注册mac地址
     */
    @ApiModelProperty(value = "注册mac地址", required = false, example = "112312321323")
    private String mac;
    /**
     * 注册imei地址
     */
    @ApiModelProperty(value = "注册imei地址", required = false, example = "112312321323")
    private String imei;
    /**
     * 注册imsi地址
     */
    @ApiModelProperty(value = "注册imsi地址", required = false, example = "112312321323")
    private String imsi;
    /**
     * 注册port地址
     */
    @ApiModelProperty(value = "注册port地址", required = false, example = "127.0.0.1")
    private String ip;
    /**
     * 注册端口号
     */
    @ApiModelProperty(value = "注册端口号", required = false, example = "80")
    private String port;

    @ApiModelProperty(value = "保险单图片", required = true, example = "")
    private String insuranceImg;

    /**
     * 最后更新状态纬度
     */
    @ApiModelProperty(value = "最后更新状态纬度", readOnly = true, example = "28.1887000000")
    @Transient
    private String lat;
    /**
     * 最后更新状态经度
     */
    @ApiModelProperty(value = "最后更新状态经度", readOnly = true, example = "113.2262550000")
    @Transient
    private String lng;
    /**
     * 车品牌
     */
    @ApiModelProperty(value = "车品牌", readOnly = true, example = "宝马")
    @Transient
    private String autoBrand;


    /**
     * 车型
     */
    @ApiModelProperty(value = "车型", readOnly = true, example = "5系")
    @Transient
    private String autoModel;

    /**
     * 用车类型
     */
    @ApiModelProperty(value = "用车类型", readOnly = true, example = "1")
    @Transient
    private Integer vehiclePurpose;

    /**
     * 颜色id,字典:plateColor
     */
    @ApiModelProperty(value = "颜色id,字典:plateColor", readOnly = true, example = "1")
    @Transient
    private String vehicleColor;

    /**
     * 车颜色
     */
    @ApiModelProperty(value = "车颜色", readOnly = true, example = "黑色")
    @Dict(type = "vehicleColor", fieldName = "vehicleColor")
    @Transient
    private String vehicleColorValue;

    /**
     * 性别，0=未知，1=男，2=女，9=未说明,字典：gender
     */
    @ApiModelProperty(value = "性别，0=未知，1=男，2=女，9=未说明,字典：gender", readOnly = true, example = "男")
    @Dict(type = "gender", fieldName = "gender")
    @Transient
    private String genderValue;

    /**
     * 学历，字典：education
     */
    @ApiModelProperty(value = "学历，字典：education", readOnly = true, example = "大学本科毕业")
    @Dict(type = "education", fieldName = "education")
    @Transient
    private String educationValue;

    /**
     * 驾驶证类型，字典：driverLicenseType
     */
    @ApiModelProperty(value = "驾驶证类型，字典：driverLicenseType", readOnly = true, example = "小型自动挡汽车")
    @Dict(type = "driverLicenseType", fieldName = "driverType")
    @Transient
    private String driverTypeValue;

    /**
     * 服务类型：1.网络预约出租车，2.巡游出租汽车，3.私人小客车合乘
     */
    @ApiModelProperty(value = "服务类型：1.网络预约出租车，2.巡游出租汽车，3.私人小客车合乘", readOnly = true, example = "网络预约出租车")
    @Dict(type = "commercialType", fieldName = "commercialType")
    @Transient
    private String commercialTypeValue;

    /**
     * 民族，字典：nation
     */
    @ApiModelProperty(value = "民族，字典：nation", readOnly = true, example = "汉族")
    @Dict(type = "nation", fieldName = "nation")
    @Transient
    private String nationValue;

    /**
     * 婚姻状况
     */
    @ApiModelProperty(value = "婚姻状况", readOnly = true, example = "离异")
    @Dict(type = "maritalStatus", fieldName = "maritalStatus")
    @Transient
    private String maritalStatusValue;


}